From 92cc6c4cbcab64762353c1df673c8326fed050d2 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 8 Jun 2005 20:25:21 +0000 Subject: [PATCH] Check for negative before appending the index, to avoid double error 2005-06-08 Matthias Clasen * gtk/gtktreemodel.c (gtk_tree_path_new_from_string): Check for negative before appending the index, to avoid double error message. (#306393, Morten Welinder) --- ChangeLog | 4 ++++ ChangeLog.pre-2-10 | 4 ++++ ChangeLog.pre-2-8 | 4 ++++ gtk/gtktreemodel.c | 5 +++-- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8b3d0f2ef7..9af287c0ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2005-06-08 Matthias Clasen + * gtk/gtktreemodel.c (gtk_tree_path_new_from_string): Check for + negative before appending the index, to avoid double error + message. (#306393, Morten Welinder) + * gtk/gtktreeview.c (gtk_tree_view_real_start_interactive_search): Don't crash if search_window is NULL. (#304914, Victor Osadci, testcase by Olaf Vitters) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 8b3d0f2ef7..9af287c0ae 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,9 @@ 2005-06-08 Matthias Clasen + * gtk/gtktreemodel.c (gtk_tree_path_new_from_string): Check for + negative before appending the index, to avoid double error + message. (#306393, Morten Welinder) + * gtk/gtktreeview.c (gtk_tree_view_real_start_interactive_search): Don't crash if search_window is NULL. (#304914, Victor Osadci, testcase by Olaf Vitters) diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 8b3d0f2ef7..9af287c0ae 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,9 @@ 2005-06-08 Matthias Clasen + * gtk/gtktreemodel.c (gtk_tree_path_new_from_string): Check for + negative before appending the index, to avoid double error + message. (#306393, Morten Welinder) + * gtk/gtktreeview.c (gtk_tree_view_real_start_interactive_search): Don't crash if search_window is NULL. (#304914, Victor Osadci, testcase by Olaf Vitters) diff --git a/gtk/gtktreemodel.c b/gtk/gtktreemodel.c index 1ec9cf2486..4ca2d0ae1d 100644 --- a/gtk/gtktreemodel.c +++ b/gtk/gtktreemodel.c @@ -362,14 +362,15 @@ gtk_tree_path_new_from_string (const gchar *path) while (1) { i = strtol (path, &ptr, 10); - gtk_tree_path_append_index (retval, i); - if (i < 0) { g_warning (G_STRLOC ": Negative numbers in path %s passed to gtk_tree_path_new_from_string", orig_path); gtk_tree_path_free (retval); return NULL; } + + gtk_tree_path_append_index (retval, i); + if (*ptr == '\000') break; if (ptr == path || *ptr != ':') -- 2.30.2